package morningcat.study.controller;

import morningcat.study.disconf.AppConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * XXX
 *
 * @author mengzhang6
 * @date 2018/10/15 9:57
 */
@RestController
public class HelloController {

    @Autowired
    private AppConfig appConfig;

    /**
     * http://127.0.0.1:8021/disconf/hello
     *
     * @return
     */
    @RequestMapping("/hello")
    public String hello() {
        return appConfig.getApiKey();
    }

}
